<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>立体旋转效果</title>
    <style>
        body {
            perspective: 1000px;
        }

        section {
            transform-style: preserve-3d;
            width: 300px;
            height: 400px;
            margin: 300px auto;
            transform: rotate3d(1, 1, 0, -45deg);
            animation: move 8s linear infinite;
            background: url(media/654.jpg) no-repeat;
            background-size: 300px;

        }

        @keyframes move {
            0% {
                transform: rotateX(0deg) rotateY(0deg) rotateZ(0deg);
            }

            100% {
                transform: rotateX(360deg) rotateY(360deg) rotateZ(360deg);
            }
        }

        section div {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            transition: all 1s;
        }

        section div:nth-child(1) {
            background: url(media/bb1.jpg) no-repeat;
            background-size: 300px;
            opacity: .9;
            transform: translateZ(200px);
        }

        section div:nth-child(2) {
            background: url(media/bb2.jpg) no-repeat;
            background-size: 300px;
            opacity: .9;
            transform: translateZ(-200px) rotateY(180deg);
        }

        section div:nth-child(3) {
            width: 400px;
            background: url(media/bb3.jpg) no-repeat;
            background-size: 400px;
            opacity: .9;
            transform: translateX(-200px) rotateY(-90deg);
        }

        section div:nth-child(4) {
            width: 400px;
            background: url(media/bb4.jpg) no-repeat;
            background-size: 400px;
            opacity: .9;
            transform: translateX(100px) rotateY(90deg);
        }

        section div:nth-child(5) {
            background: url(media/bb5.jpg) no-repeat;
            background-size: 300px;
            opacity: .9;
            transform: translateY(200px) rotateX(-90deg);
        }

        section div:nth-child(6) {
            background: url(media/bb6.jpg) no-repeat;
            background-size: 300px;
            opacity: .9;
            transform: translateY(-200px) rotateX(90deg);
        }

        section:hover div:nth-child(1) {
            transform: translateZ(250px) rotateY(0deg);
            border-radius: 50%;
        }

        section:hover div:nth-child(2) {
            transform: translateZ(-250px) rotateY(180deg);
            border-radius: 50%;
        }

        section:hover div:nth-child(3) {
            transform: translateX(-250px) rotateY(-90deg);
            border-radius: 50%;
        }

        section:hover div:nth-child(4) {
            transform: translateX(150px) rotateY(90deg);
            border-radius: 50%;
        }

        section:hover div:nth-child(5) {
            transform: translateY(250px) rotateX(-90deg);
            border-radius: 50%;
        }

        section:hover div:nth-child(6) {
            transform: translateY(-260px) rotateX(90deg);
            border-radius: 50%;
        }
    </style>
</head>

<body>
    <section>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
        <div></div>
    </section>
</body>

</html>